<div class="proof">
  <% partial_tree = proof.try(:partial_tree_of, account) %>
  <% if proof.try(:ready?) && partial_tree.present? %>
    <% root_target = "#{proof.currency}_root_json" %>
    <% partial_tree_target = "#{proof.currency}_partial_tree_json" %>

    <div class="root json">
      <h5><%= t('.root-json') %></h5>
      <pre id="<%= root_target %>"><%= proof.root.to_json %></pre>
      <div class="clearfix"></div>
    </div>

    <div class="partial-tree json">
      <div class="assets">
        <span class="title">
          <%= t('.partial-tree', currency: proof.currency.code.upcase) %>
        </span>
        <span class="currency">
          <%= partial_tree.sum %>
        </span>
      </div>
      <pre id="<%= partial_tree_target %>"><%= partial_tree.json.to_json %></pre>
      <div class="clearfix"></div>
    </div>

    <div class="timestamp">
      <%= t('.timestamp', time: proof.timestamp) %>
    </div>

    <hr>

    <div class="proof-bottom"><%= verify_link(proof, partial_tree) %></div>

  <% else %>
    <p><%= t('.liability_proof_generation') %></p>
  <% end %>
</div>
